
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
import Vodal from 'vodal'
import 'vodal/common.css'
import 'vodal/zoom.css'
import 'vue2-toast/lib/toast.css'
import Toast from 'vue2-toast'
import Vueg from 'vueg'
import InfiniteScroll from 'vue-infinite-scroll'
import './common/configHttp.js'
import './common/deviceInfo'
import * as filters from './common/filters'
import api from './api'
import './css/reset.css' // 全局css重置
import './css/public.css' // 全局公用css class
import './css/animate.css' // 全局公用css动画效果

import './directives/InputDelete'

Vue.config.productionTip = false

// 全局引入modal插件
Vue.component(Vodal.name, Vodal)

Vue.use(Toast, {
  type: 'center',
  duration: 3000,
  wordWrap: true,
  width: '80%'
})

// 开启页面切换动画
Vue.use(Vueg, router)

// 无限滚动
Vue.use(InfiniteScroll)

// 全局滤镜
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

// 后台api接口 全局注册
Vue.use(api)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
